package com.beimin.evedata.model.inv;

import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@org.hibernate.annotations.Entity(mutable = false)
@Table(name = "invMarketGroups")
public class InvMarketGroup {
	@Id
	@GeneratedValue
	private int marketGroupID;
	@OneToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
	@JoinColumn(name = "parentGroupID")
	private InvMarketGroup parentMarketGroup; // parentGroupID
	private String marketGroupName;
	private String description;
	private Integer graphicID;
	@OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY, mappedBy = "marketGroup")
	private Collection<InvType> types; // hasTypes
	
	public int getMarketGroupID() {
		return marketGroupID;
	}
	public void setMarketGroupID(int marketGroupID) {
		this.marketGroupID = marketGroupID;
	}
	public InvMarketGroup getParentMarketGroup() {
		return parentMarketGroup;
	}
	public void setParentMarketGroup(InvMarketGroup parentMarketGroup) {
		this.parentMarketGroup = parentMarketGroup;
	}
	public String getMarketGroupName() {
		return marketGroupName;
	}
	public void setMarketGroupName(String marketGroupName) {
		this.marketGroupName = marketGroupName;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getGraphicID() {
		return graphicID;
	}
	public void setGraphicID(int graphicID) {
		this.graphicID = graphicID;
	}
	public Collection<InvType> getTypes() {
		return types;
	}
	public void setTypes(Collection<InvType> types) {
		this.types = types;
	}
}